package com.nightsoul.dubbo.action;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.nightsoul.dubbo.provider.service.CacheService;
import com.nightsoul.dubbo.provider.service.CallbackService;
import com.nightsoul.dubbo.provider.service.DemoService;
import com.nightsoul.dubbo.provider.service.ValidationService;

@Component
public class ServiceAction {
	@Reference()
	private DemoService demoService;
	@Reference(url="dubbo://localhost:20880")
	private DemoService demoService2;
	@Reference(validation="true")
	private ValidationService validationService;
	@Reference(cache="lru")
	private CacheService cacheService;
	@Reference(group="generic")
	private DemoService genericDemoService;
	@Reference
	private CallbackService callbackService;
	@Reference(group="stub")
	private CacheService stubCacheService;
	@Reference(group="mock")
	private CacheService mockCacheService;
	
	public ValidationService getValidationService() {
		return validationService;
	}
	
	public CacheService getCacheService() {
		return cacheService;
	}
	
	public DemoService getGenericDemoService() {
		return genericDemoService;
	}
	
	public DemoService getDemoService() {
		return demoService;
	}
	
	public DemoService getDirectDemoService() {
		return demoService2;
	}
	
	public CallbackService getCallbackService() {
		return callbackService;
	}
	
	public CacheService getStubCacheService() {
		return stubCacheService;
	}
	
	public CacheService getMockCacheService() {
		return mockCacheService;
	}
}
